<?php

require_once ('BaseService.php');

/**
 * Description of RepresentantesService
 *
 * @author MFerreira
 */
class RepresentantesService extends BaseService {

    //put your code here

    function Create(Representantes $Representante) {
        $serializer = parent::getSerializer(parent::getMimeType(), "Representante");
        $data = $serializer->serialize($Representante);
        $response = parent::invokeService("Representante", $data);
        return $response;
    }

    function GetAll() {
        $response = parent::invokeService("GetAll");
        Loader::using("models::entities::Representantes");
        $result = parent::processArrayResponse($response, parent::getMimeType(), "Representantes", Representantes::MAPPING());
        return $result;
    }

    function GetDocente(){
        $response = parent::invokeService("GetDocente");
        Loader::using("models::entities::Representantes");
        $result = parent::processArrayResponse($response, parent::getMimeType(), "Representantes", Representantes::MAPPING());
        return $result;
    }

    function GetByFacultad($codigoFacultad){
        $response = parent::invokeService("GetByFacultad", $codigoFacultad);
        Loader::using("models::entities::Representantes");
        $result = parent::processArrayResponse($response, parent::getMimeType(), "Representantes", Representantes::MAPPING());
        return $result;
    }

    public function GetResult() {
        $response = parent::invokeService("GetResult");

        Loader::using("models::entities::Representantes");
        $result = parent::processArrayResponse($response, parent::getMimeType(), "KeyValue",array("Key"=> Representantes::MAPPING()));

        return $result;
    }

    public function getServiceClass() {
        return "Representantes";
    }
}

?>
